package android.slc.db_backup.factory;

import android.slc.db_backup.entity.BackupDb;
import android.slc.db_backup.factory.impl.MySQLBackupHandler;

import java.util.Objects;

public class BackUpHandlerFactory {
    public static BackupHandler getBackUpHandler(BackupDb backupDb) {
        String type = backupDb.getType();
        if (Objects.equals(type, "MySQL")) return new MySQLBackupHandler();
        throw new RuntimeException("不存在的Handler类型");
    }
}
